package day2;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Race100 {
    public static void main(String[] args) {
        //100米,12秒进入决赛,根据性别进入男子组和女子组
        double score;
        String sex;
        Scanner in = new Scanner(System.in);
        System.out.println("请输入成绩:");
        score = in.nextDouble();
        System.out.println("再输入性别:");
        sex = in.next();
        //嵌套
        if (score <= 12) {
            if (sex.equals("男")) {
                System.out.println("进入男子组决赛");
            } else {
                System.out.println("进入了女子组决赛");
            }
        } else {
            System.out.println("被淘汰");
        }
        //考虑用多重
//        if (score <= 12 && sex.equals("男")) {
//            System.out.println("进入男子组决赛");
//        } else if (score <= 12 && sex.equals("女")) {
//            System.out.println("进入了女子组决赛");
//        } else {
//            System.out.println("被淘汰");
//        }
    }
}
